package com.jbm.onehome.iface;

import javax.persistence.*;
import com.jbm.core.iface.IAcross;

/**
 * Created by lyh on 2017-02-22.
 */
@Entity
@Table(name = "info_scope", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class InfoScopeEntity extends IAcross
{
	public InfoScopeEntity()
	{
		super();
	}

	public InfoScopeEntity(IAcross ia)
	{
		super(ia);
	}

    private static final long serialVersionUID = 5769519634080067043L;
    private Integer giId;
    private Integer infoId;
    private int scopeId;

    @Basic
    @Column(name = "gi_id")
    public Integer getGiId() {
        return giId;
    }

    public void setGiId(Integer giId) {
        this.giId = giId;
    }

    @Basic
    @Column(name = "info_id")
    public Integer getInfoId() {
        return infoId;
    }

    public void setInfoId(Integer infoId) {
        this.infoId = infoId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InfoScopeEntity that = (InfoScopeEntity) o;

        if (giId != null ? !giId.equals(that.giId) : that.giId != null) return false;
        if (infoId != null ? !infoId.equals(that.infoId) : that.infoId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = giId != null ? giId.hashCode() : 0;
        result = 31 * result + (infoId != null ? infoId.hashCode() : 0);
        return result;
    }

    @Id
    @GeneratedValue
    @Column(name = "scope_id")
    public int getScopeId() {
        return scopeId;
    }

    public void setScopeId(int scopeId) {
        this.scopeId = scopeId;
    }

    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
}
